package com.foreknow.service.impl;

import com.foreknow.dao.GuestbookDao;
import com.foreknow.dao.impl.GuestbookDaoImpl;
import com.foreknow.dao.impl.GuestbookDaoXXX;
import com.foreknow.model.Guestbook;
import com.foreknow.service.GuestbookService;

public class GuestbookServiceImpl implements GuestbookService {

    private GuestbookDao guestbookDao;

    //作用：将属性guestbookDao进行初始化
    public void setGuestbookDao(GuestbookDao guestbookDao) {
        this.guestbookDao = guestbookDao;
    }

    @Override
    public Guestbook isValidate(String name, String pass) {
        //1. 权限  普通用户  管理员   超级管理员
        //2. 密码需加密的
        //调用持久层的方法
        //Guestbook gb = guestbookDao.login(name,pass);
        return guestbookDao.login(name,pass);
    }
}
